//
// Created by yonghu0 on 25-10-30.
//

#ifndef CONFIG_H
#define CONFIG_H

#include <iostream>
#include <unordered_map>

void Trim(std::string &str);

class Config
{
public:
    static Config &GetInstance();

    bool LoadConfig(const char *config_file_path);
    std::string GetValue(const std::string &key);

private:
    std::unordered_map<std::string, std::string> m_config_map;

    Config();
    Config(const Config &) = delete;
    Config &operator=(const Config &) = delete;
    Config(Config &&) = delete;
    Config &operator=(Config &&) = delete;
};


#endif //CONFIG_H
